using Gateway.Infrastructure.AutoDI;
using Gateway.IQuery.Menu.Result;

namespace Gateway.IQuery.Menu;

/// <summary>
/// 菜单查询服务
/// </summary>
public interface IMenuQuery : IDependency
{
    /// <summary>
    /// 获取菜单详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<MenuDetailResult> GetDetail(string id);

    /// <summary>
    /// 获取有效的菜单树形结构
    /// </summary>
    /// <returns></returns>
    Task<List<MenuTreeResult>> GetTree();


    /// <summary>
    /// 根据角色集合获取权限菜单树
    /// </summary>
    /// <param name="roleIds"></param>
    /// <returns></returns>
    Task<List<MenuTreeResult>> GetAuthTreeByRoleIds(List<string> roleIds);


    /// <summary>
    /// 根据角色集合获取功能权限
    /// </summary>
    /// <param name="roleIds"></param>
    /// <returns></returns>
    Task<List<string>> GetFuncPermissionByRoleIds(List<string> roleIds);


    /// <summary>
    /// 根据角色标识 获取api 权限集合
    /// </summary>
    /// <param name="roleIds"></param>
    /// <returns></returns>
    Task<List<MenuApiAuthResult>> GetMenuApis(List<string> roleIds);
}